function C = c_fun(name,f,t)
switch name
    case 'DICTP1'
        f1 = f(1);
        f2 = f(2);
        c1 = max(0,-(f2/t) + (0.858*exp(-0.541 * f1)));
        c2 = max(0,-(f2/t) + (0.728*exp(-0.295 * f1)));
        C = c1 + c2;
     case 'DICTP1.1'
        f1 = f(1);
        f2 = f(2);
        c1 = max(0,-(f2) + (0.858*exp(-0.541 * f1)));
        c2 = max(0,-(f2) + (0.728*exp(-0.295 * f1)));
        C = c1 + c2;
    case 'DICTP2'
        f1 = f(1);
        f2 = f(2);
        a = 0.2; b = 10; c = 1; d = 6; e = 1; s = -0.2*pi;
        C= max(0,a*(abs(sin(b*pi*((f2/t-e)*sin(s) + f1 * cos(s))^c)))^d - (f2/t-e)*cos(s) + f1*sin(s));
    case 'DICTP2.1'
        f1 = f(1);
        f2 = f(2);
        a = 0.2; b = 10; c = 1; d = 1; e = 1; s = -0.2*pi;
        C= max(0,a*(abs(sin(b*pi*((f2/t-e)*sin(s) + f1 * cos(s))^c)))^d - (f2/t-e)*cos(s) + f1*sin(s));
    case 'DICTP3'
        f1 = f(1);
        f2 = f(2);
        a = 0.1; b = 10; c = 1; d = 0.5; e = 1; s = -0.2*pi;
        C= max(0,a*(abs(sin(b*pi*((f2/t-e)*sin(s) + f1 * cos(s))^c)))^d - (f2/t-e)*cos(s) + f1*sin(s));
    case 'DICTP4'
        f1 = f(1);
        f2 = f(2);
        a = 0.75; b = 10; c = 1; d = 0.5; e = 1; s = -0.2*pi;
        C= max(0,a*(abs(sin(b*pi*((f2/t-e)*sin(s) + f1 * cos(s))^c)))^d - (f2/t-e)*cos(s) + f1*sin(s));
    case 'DICTP5'
        f1 = f(1);
        f2 = f(2);
        a = 0.1; b = 10; c = 2; d = 0.5; e = 1; s = -0.2*pi;
        C= max(0,a*(abs(sin(b*pi*((f2/t-e)*sin(s) + f1 * cos(s))^c)))^d - (f2/t-e)*cos(s) + f1*sin(s));
    case 'DICTP6'
        f1 = f(1);
        f2 = f(2);
        a = 40; b = 0.5; c = 1; d = 2; e = -2; s = 0.1*pi;
        C= max(0,a*(abs(sin(b*pi*((f2/t-e)*sin(s) + f1 * cos(s))^c)))^d - (f2/t-e)*cos(s) + f1*sin(s));
    case 'DICTP7'
        f1 = f(1);
        f2 = f(2);
        a = 40; b = 5; c = 1; d = 6; e = 0; s = -0.05*pi;
        C= max(0,a*(abs(sin(b*pi*((f2/t-e)*sin(s) + f1 * cos(s))^c)))^d - (f2/t-e)*cos(s) + f1*sin(s));
    case 'DICTP8'
        f1 = f(1);
        f2 = f(2);
        a1 = 40; b1 = 0.5; c1 = 1; d1 = 2; e1 = -2; s1 = 0.1*pi;
        c1 = max(0,a1*(abs(sin(b1*pi*((f2/t-e1)*sin(s1) + f1 * cos(s1))^c1)))^d1 - (f2/t-e1)*cos(s1) + f1*sin(s1));  
        a2 = 40; b2 = 2; c2 = 1; d2 = 6; e2 = 0; s2 = -0.05*pi;
        c2 = max(0,a2*(abs(sin(b2*pi*((f2/t-e2)*sin(s2) + f1 * cos(s2))^c2)))^d2 - (f2/t-e2)*cos(s2) + f1*sin(s2));  
        C = c1 + c2;
    case 'DICF1'
        f1 = f(1);
        f2 = f(2);
        mt = max(1.43-0.05*t,0.43+0.05*t);
        a = 0.2;b = 2;c = 1; d = 1; e = 1;s1 = -0.25*pi;zt = 6;sl=1;s2=-pi/16;
        c1 = max(0,a*(abs(sin(b*pi*((f2-e)*sin(s2) + f1*cos(s2))^c)))^d - (f2-e)*cos(s1) + sin(s1)*f1 + mt);
        c2 = max(0,sl*f1 + f2 - zt);
        c3 = max(0,mt - zt);
        C = c1 + c2 + c3;
   case 'DICF1.1'
        f1 = f(1);
        f2 = f(2);
        mt = max(1.43-0.05*t,0.43+0.05*t);
        a = 0.2;b = 5;c = 2; d = 2; e = 1;s1 = -0.25*pi;zt = 6;sl=1;s2=-pi/16;
        c1 = max(0,a*(abs(sin(b*pi*((f2-e)*sin(s2) + f1*cos(s2))^c)))^d - (f2-e)*cos(s1) + sin(s1)*f1 + mt);
        c2 = max(0,sl*f1 + f2 - zt);
        c3 = max(0,mt - zt);
        C = c1 + c2 + c3;
  case 'ICF2'
        f1 = f(1);
        f2 = f(2);
        mt = max(1.16-0.075*t,-0.34+0.075*t);
        a = 0.2;b = 2;c = 1; d = 1; e = 1;s1 = -0.25*pi;s2=-pi/16;zt = 6;sl=1;
        c1 = max(0,a*(abs(sin(b*pi*((f2-e)*sin(s2) + f1*cos(s2))^c)))^d - (f2-e)*cos(s1) + sin(s1)*f1 +mt);
        c2 = max(0,sl*f1 + f2 - zt);
        c3 = max(0,mt - zt);
        C = c1 + c2 + c3;
  case 'ICF3'
        f1 = f(1);
        f2 = f(2);
        mt = min(0.93+0.05*t,1.93-0.05*t);
        a = 0.2;b = 2;c = 1; d = 1; e = 1;s1 = -0.25*pi;s2=-pi/16;zt = 6;sl=1;
        c1 = max(0,a*(abs(sin(b*pi*((f2-e)*sin(s2) + f1*cos(s2))^c)))^d - (f2-e)*cos(s1) + sin(s1)*f1 +mt);
        c2 = max(0,sl*f1 + f2 - zt);
        c3 = max(0,mt - zt);
        C = c1 + c2 + c3;
  case 'ICF4'
        f1 = f(1);
        f2 = f(2);
        mt = min(0.41+0.075*t,1.91-0.075*t);
        a = 0.2;b = 2;c = 1; d = 1; e = 1;s1 = -0.25*pi;s2=-pi/16;zt = 6;sl=1;
        c1 = max(0,a*(abs(sin(b*pi*((f2-e)*sin(s2) + f1*cos(s2))^c)))^d - (f2-e)*cos(s1) + sin(s1)*f1 +mt);
        c2 = max(0,sl*f1 + f2 - zt);
        c3 = max(0,mt - zt);
        C = c1 + c2 + c3;
    case 'DICF5'
        f1 = f(1);
        f2 = f(2);
        mt = max(1.43-0.05*t,0.43+0.05*t);
        a = 0.2;b = 2;c = 1; d = 1; e = 1;s1 = -0.25*pi;s2=-pi/16;zt = 6;sl=1;
        c1 = max(0,a*(abs(sin(b*pi*((f2-e)*sin(s2) + f1*cos(s2))^c)))^d - (f2-e)*cos(s1) + sin(s1)*f1 +mt);
        c2 = max(0,sl*f1 + f2 - zt);
        c3 = max(0,mt - zt);
        C = c1 + c2 + c3;
   case 'DICF6'
        f1 = f(1);
        f2 = f(2);
        mt = max(1.16-0.075*t,-0.34+0.075*t);
        a = 0.2;b = 2;c = 1; d = 1; e = 1;s1 = -0.25*pi;s2=-pi/16;zt = 6;sl=1;
        c1 = max(0,a*(abs(sin(b*pi*((f2-e)*sin(s2) + f1*cos(s2))^c)))^d - (f2-e)*cos(s1) + sin(s1)*f1 +mt);
        c2 = max(0,sl*f1 + f2 - zt);
        c3 = max(0,mt - zt);
        C = c1 + c2 + c3;
    case 'DICF7'
        f1 = f(1);
        f2 = f(2);
        mt = min(0.93+0.05*t,1.93-0.05*t);
        a = 0.2;b = 2;c = 1; d = 1; e = 1;s1 = -0.25*pi;s2=-pi/16;zt = 6;sl=1;
        c1 = max(0,a*(abs(sin(b*pi*((f2-e)*sin(s2) + f1*cos(s2))^c)))^d - (f2-e)*cos(s1) + sin(s1)*f1 +mt);
        c2 = max(0,sl*f1 + f2 - zt);
        c3 = max(0,mt - zt);
        C = c1 + c2 + c3;
   case 'DICF8'
        f1 = f(1);
        f2 = f(2);
        mt = min(0.41+0.075*t,1.91-0.075*t);
        a = 0.2;b = 2;c = 1; d = 1; e = 1;s1 = -0.25*pi;s2=-pi/16;zt = 6;sl=1;
        c1 = max(0,a*(abs(sin(b*pi*((f2-e)*sin(s2) + f1*cos(s2))^c)))^d - (f2-e)*cos(s1) + sin(s1)*f1 +mt);
        c2 = max(0,sl*f1 + f2 - zt);
        c3 = max(0,mt - zt);
        C = c1 + c2 + c3;
end